<!DOCTYPE html>
<html lang="zh_CN">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>弹跳的球</title>
    <style>
      * {
        padding: 0px;
        margin: 0px;
      }
      .ball-box {
        width: 100vw;
        height: 100vh;
        background-color: #2ecc71;
        display: flex;
        justify-content: center;
        align-items: center;
      }
      .ball {
        width: 50px;
        height: 50px;
        background: radial-gradient(at center, #d35400, #e67e22);
        border-radius: 50%;
        z-index: 2;
        animation-name: ani-ball;
        animation-duration: 1s;
        animation-iteration-count: infinite;
        animation-direction: alternate-reverse;
      }
      @keyframes ani-ball {
        to {
          transform: translateY(-300px);
        }
      }
      .ball-shadow {
        width: 150px;
        height: 40px;
        background: rgba(0, 0, 0, 1);
        position: absolute;
        transform: translateY(30px);
        z-index: 1;
        border-radius: 50%;
        filter: blur(10px);
        opacity: 1;
        animation-name: ani-shadow;
        animation-duration: 1s;
        animation-iteration-count: infinite;
        animation-direction: alternate-reverse;
      }
      @keyframes ani-shadow {
        to {
          height: 20px;
          filter: blur(20px);
          background: rgba(0, 0, 0, 0.1);
        }
      }
    </style>
  </head>
  <body>
    <div class="ball-box">
      <div class="ball"></div>
      <section class="ball-shadow"></section>
    </div>
  </body>
</html>
